
package com.insigma.business.qrcode.merchant.service.impl;

import com.insigma.business.qrcode.common.service.SequenceGenerator;
import com.insigma.business.qrcode.pay.dto.CareWelfareMerchantEvaluationCountDTO;
import com.insigma.business.qrcode.soldier.dto.SequenceNameConstant;
import com.insigma.business.qrcode.merchant.dao.CareWelfareMerchantEvaluationDao;
import com.insigma.business.qrcode.merchant.dto.search.CareWelfareMerchantEvaluationBSearcher;
import com.insigma.business.qrcode.merchant.entity.CareWelfareMerchantEvaluationDO;
import com.insigma.business.qrcode.merchant.service.CareWelfareMerchantEvaluationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("careWelfareMerchantEvaluationService")
public class CareWelfareMerchantEvaluationServiceImpl implements CareWelfareMerchantEvaluationService {

    @Autowired(required = false)
    private CareWelfareMerchantEvaluationDao careWelfareMerchantEvaluationDao;
    @Autowired(required = false)
    private SequenceGenerator sequenceGenerator;

    
    @Override
    public List<CareWelfareMerchantEvaluationDO> search(final CareWelfareMerchantEvaluationBSearcher careWelfareMerchantEvaluationBSearcher) {
        return careWelfareMerchantEvaluationDao.search(careWelfareMerchantEvaluationBSearcher);
    }
   
    @Override
    public CareWelfareMerchantEvaluationDO get(final String id){
        return careWelfareMerchantEvaluationDao.get(id);
    }

    
    @Override
    public Integer insert(final CareWelfareMerchantEvaluationDO careWelfareMerchantEvaluationDO){
        careWelfareMerchantEvaluationDO.setId(sequenceGenerator.genKey(SequenceNameConstant.CARE_WELFARE_MERCHANT_EVALUATION_ID));
        return careWelfareMerchantEvaluationDao.insert(careWelfareMerchantEvaluationDO);
    }

    
    @Override
    public Integer update(final CareWelfareMerchantEvaluationDO careWelfareMerchantEvaluationDO){
        return careWelfareMerchantEvaluationDao.update(careWelfareMerchantEvaluationDO);
    }

    
    @Override
    public Integer delete(final String id, final String modifierType, final String modifierId){
        return careWelfareMerchantEvaluationDao.delete(id,modifierType,modifierId);
    }

    @Override
    public CareWelfareMerchantEvaluationCountDTO selectEvaluationCount(String merchantId) {
        return careWelfareMerchantEvaluationDao.selectEvaluationCount(merchantId);
    }

}
